package com.weizhu.swufer.autoconfiguration;

import com.weizhu.swufer.core.server.SwuferBootstrap;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessor;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableConfigurationProperties(SwuferProperties.class)
public class SwuferAutoConfiguration implements InstantiationAwareBeanPostProcessor {

    private static final Logger logger = LoggerFactory.getLogger(SwuferAutoConfiguration.class);

    @Autowired
    SwuferProperties swuferProperties;

    @Bean
    public SwuferBootstrap getSwuferBootstrap() {
        SwuferBootstrap bootstrap = SwuferBootstrap.getInstance();
        return bootstrap;
    }


}
